package com.qfedu.knowledge.entity.dto;

import com.qfedu.knowledge.entity.constant.QuestionConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName QueryDTO
 * @Author ykx
 * @Date 2024/5/17 17:18
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryDTO {

    /**
     * 是否掌握
     */
    private Integer isMaster;

    /**
     * 排序字段
     */
    private String orderColumn;

    /**
     * 排序顺序
     */
    private String orderSort;

    /**
     * 题目
     */
    private String question;

    /**
     * 题目类型
     */
    private List<Integer> typeList;

    /**
     * ids
     */
    private List<Long> ids;


    public void setOrderColumn(String orderColumn) {
        this.orderColumn = QuestionConstant.ORDER_COLUMN_MAP.get(orderColumn);
    }

    public void setOrderSort(String orderSort) {
        this.orderSort = QuestionConstant.SORT_MAP.get(orderSort);
    }

}
